<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ajax</title>
</head>
<body>
    <select id="sltEmp">

    </select>
</body>
<script src="../../lib/jquery.js"></script>
<script>


    function initSelect(items,selector) {
        $.each(items, function (index, item) {
            let opt = $('<option></option>').val(item.id).text(item.name)
            $(selector).append(opt);
        })
    }


   $.ajax({
      url:'../../mock/employee.json',
      method:'get',
      dataType:'json',
      success:function (data) {
          initSelect(data,'#sltEmp')
      }
  })

  console.log("do sth");

</script>

</html>